import request from '@/utils/request'

//查询所有班级列表
export function listAllClasses() {
  return request({
    url: '/teaching/classes/list/all',
    method: 'get'
  })
}
// 查询课程列表
export function listClasses(query) {
  return request({
    url: '/teaching/classes/list',
    method: 'get',
    params: query
  })
}

// 查询课程详细
export function getClasses(id) {
  return request({
    url: '/teaching/classes/' + id,
    method: 'get'
  })
}

// 新增课程
export function addClasses(data) {
  return request({
    url: '/teaching/classes',
    method: 'post',
    data: data
  })
}

// 修改课程
export function updateClasses(data) {
  return request({
    url: '/teaching/classes',
    method: 'put',
    data: data
  })
}

// 删除课程
export function delClasses(id) {
  return request({
    url: '/teaching/classes/' + id,
    method: 'delete'
  })
}
